home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Wonky Flux Batch 2019 02
/
Wonky_Flux_Batch_2019-02.zip
/
Wonky Flux Batch 2019-02
/
021 - HO Utilities - Clock Utility System.dsk
/
MILLISECONDS.bas
< prev
next >
Wrap
BASIC Source File
|
2019-02-16
|
662b
|
16 lines
10 REM MILLISECONDS
20 REM CALL 777 WILL TURN OFF INTERRUPTS
30 IF PEEK(768) = 76 THEN CALL 777: REM IF MEM 768 HAS A 76 IN IT THEN BIN.MILLISEC IS ALREADY IN MEMORY
40 IF PEEK(768) = 76 THEN 60
50 D$ = CHR$(4): PRINT D$"BLOAD BIN.MILLISEC"
60 CALL 768: REM SET UP INTERRUPTS
70 IF PEEK(784) = 0 THEN PRINT "TIMEMASTER NOT FOUND": END
80 B = 256
90 HOME
100 CALL 774: REM SAVE COUNT IN 780...783
110 MS = 0: FOR A = 780 TO 783:MS = MS *B + PEEK(A): NEXT
120 REM REMEMBER TIMEMASTER REALLY INTERRUPTS AT 1024 HZ
130 C = MS/1024:S = INT(C):MS = (C -S) *1000
140 VTAB 1: HTAB 1
150 PRINT S"." LEFT$( STR$(MS) +"00",3)" SECONDS"
160 GOTO 100